<template>
  <art-table
    :data="tableData"
    :loading="tableLoading"
    :currentPage="pageNum"
    :pageSize="pageSize"
    :total="pageTotal"
    @current-change="currentChange"
    @size-change="sizeChange"
  >
    <template #default>
      <el-table-column label="学习时间" prop="mobile" align="center" />
      <el-table-column label="科目" prop="name" align="center" />
      <el-table-column label="车型" prop="mobile" align="center" />
      <el-table-column label="练习试卷" prop="source" align="center" />
      <!-- <el-table-column #default="scope" label="状态" align="center">
                <el-switch v-model="scope.row.status" />
            </el-table-column> -->
      <el-table-column label="用时" prop="tags" align="center" />
      <el-table-column label="答卷分数" prop="registerTime" align="center" />
      <el-table-column label="正确" prop="lastActiveTime" align="center" />
      <el-table-column label="错误" prop="lastActiveTime" align="center" />
      <el-table-column label="累计学时" prop="lastActiveTime" align="center" />
    </template>
  </art-table>
</template>
<script setup lang="ts">
  import { ACCOUNT_TABLE_DATA } from '@/mock/temp/formData_userlist'
  import { FormInstance } from 'element-plus'
  import { ElMessageBox, ElMessage } from 'element-plus'
  import type { FormRules } from 'element-plus'

  const tableData = ref([])
  const tableLoading = ref(false)
  const pageNum = ref(1)
  const pageSize = ref(10)
  const pageTotal = ref(0)
  // async function getData() {
  //     try {
  //         tableLoading.value = true
  //         const { code, data } = await userList({
  //             pageNum: pageNum.value,
  //             pageSize: pageSize.value,
  //             queryStartTime: searchForm.creatStartTime ? formatDate(searchForm.creatStartTime) : '',
  //             queryEndTime: searchForm.creatEndTime ? formatDate(searchForm.creatEndTime) : '',
  //             queryName: searchForm.name,
  //             queryMobile: searchForm.phone,
  //             queryGender: searchForm.sex,
  //             queryIsVip: searchForm.level,
  //             queryStartActiveTime: searchForm.activeStartTime ? formatDate(searchForm.activeStartTime) : '',
  //             queryEndActiveTime: searchForm.activeEndTime ? formatDate(searchForm.activeEndTime) : ''
  //         })
  //         if (code === '00000' && data) {
  //             tableData.value = data.list
  //             pageTotal.value = data.total

  //             console.log(tableData.value, 'tableData.value')
  //         }
  //     } catch (e) {
  //     } finally {
  //         tableLoading.value = false
  //     }
  // }
  const currentChange = (val: number) => {
    pageNum.value = val
    // getData()
  }

  const sizeChange = (val: number) => {
    pageSize.value = val
    pageNum.value = 1
    // getData()
  }
</script>
<style scoped lang="scss"></style>
